<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <base href="{$Think.const.BASE_PATH}">
    <title>后台登录</title>
    <!--引入头部meta文件 -->
    {include file="./application/index/view/index/head_meta.html" /}
    <!--引入头部link(css)文件 -->
    {include file="./application/index/view/index/head_link.html" /}
    <!--引入头部script文件 -->
    {include file="./application/index/view/index/head_script.html" /}

    <link href="public/static/plugs/adminLoginModel/public/css/base.css" rel="stylesheet" type="text/css">
    <link href="public/static/plugs/adminLoginModel/public/css/login.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="login">
    <form id="login_form" action="" method="post">
        <div class="logo"></div>
        <div class="login_form">
            <div class="user">
                <input class="text_value" value="" name="account_l" type="text" id="username">
                <input class="text_value" value="" name="password_l" type="password" id="password">
            </div>
            <a class="button" id="login_btn" >登录</a>
        </div>

        <div id="tip"></div>
        <div class="foot">
            Copyright © 2011-2018  All Rights Reserved. Create By <a style="color: white;" href="http://www.xlosy.com/" target="_blank" title="小龙神佑">小龙神佑</a> - Collect from <a style="color: white;" href="http://www.xlosy.com/" title="小龙神佑" target="_blank">小龙神佑</a>
        </div>
    </form>
</div>
<script>
    $(function () {
        /**登录*/
        $("#login_btn").click(function () {
            $.ajax({
                url:"{:url('admin/Adminverification/login')}",
                type:"POST",
                dataType:"json",
                data:$("#login_form").serialize(),
                success:function (data) {
                    if(data.code!="0"){
                        location.href = data.url;
                    }else{
                        alert("用户名或密码错误！");
                    }
                }
            });
        });
    })
</script>
</body>
</html>